
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>IJPay 支付宝初始化 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="alipay-wap.html" />
    
    
    <link rel="prev" href="alipay-config.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                    项目导航
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../contact.html">
            
                <a href="../../contact.html">
            
                    
                    联系方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../study.html">
            
                <a href="../../study.html">
            
                    
                    学习资料
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../gitchat.html">
            
                <a href="../../gitchat.html">
            
                    
                    GitChat交流
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../../blog/">
            
                <a href="../../blog/">
            
                    
                    我的博客
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../../opensource/">
            
                <a href="../../opensource/">
            
                    
                    开源项目
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../opensource/IJPay.html">
            
                <a href="../../opensource/IJPay.html">
            
                    
                    What is a IJPay?
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../opensource/JPay.html">
            
                <a href="../../opensource/JPay.html">
            
                    
                    Android支付SDK-JPay
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../opensource/weixin_guide.html">
            
                <a href="../../opensource/weixin_guide.html">
            
                    
                    极速开发微信公众号
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../">
            
                <a href="../">
            
                    
                    IJPay 文档
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../../IJPay-Demo.html">
            
                <a href="../../IJPay-Demo.html">
            
                    
                    IJPay-Demo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="./">
            
                <a href="./">
            
                    
                    支付宝支付
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.1" data-path="alipay-config.html">
            
                <a href="alipay-config.html">
            
                    
                    配置应用环境
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.7.2.2" data-path="alipay-init.html">
            
                <a href="alipay-init.html">
            
                    
                    IJPay 支付宝初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.3" data-path="alipay-wap.html">
            
                <a href="alipay-wap.html">
            
                    
                    支付宝手机网站支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.4" data-path="alipay-pc.html">
            
                <a href="alipay-pc.html">
            
                    
                    支付宝电脑网站支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.5" data-path="alipay-offline.html">
            
                <a href="alipay-offline.html">
            
                    
                    当面付
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.5.1" data-path="alipay-offline/alipay-qrPay.html">
            
                <a href="alipay-offline/alipay-qrPay.html">
            
                    
                    支付宝扫码支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.5.2" data-path="alipay-offline/alipay-barPay.html">
            
                <a href="alipay-offline/alipay-barPay.html">
            
                    
                    支付宝条码支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.5.3" data-path="alipay-offline/alipay-wavePay.html">
            
                <a href="alipay-offline/alipay-wavePay.html">
            
                    
                    支付宝声波支付
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.2.6" data-path="alipay-coupon.html">
            
                <a href="alipay-coupon.html">
            
                    
                    支付宝红包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.7" data-path="alipay-transfer.html">
            
                <a href="alipay-transfer.html">
            
                    
                    支付宝提现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.8" data-path="alipay-app.html">
            
                <a href="alipay-app.html">
            
                    
                    支付宝APP支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.9" data-path="alipay-notify.html">
            
                <a href="alipay-notify.html">
            
                    
                    支付宝服务端异步通知
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.10" data-path="alipay-api.html">
            
                <a href="alipay-api.html">
            
                    
                    支付宝API字典
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../wxpay/">
            
                <a href="../wxpay/">
            
                    
                    微信支付
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="../wxpay/wxapi.html">
            
                <a href="../wxpay/wxapi.html">
            
                    
                    微信公用API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="../wxpay/allapi.html">
            
                <a href="../wxpay/allapi.html">
            
                    
                    微信支付API接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="../wxpay/micropay.html">
            
                <a href="../wxpay/micropay.html">
            
                    
                    微信刷卡支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.4" data-path="../wxpay/wechatPay.html">
            
                <a href="../wxpay/wechatPay.html">
            
                    
                    微信公众号支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.5" data-path="../wxpay/qrPay.html">
            
                <a href="../wxpay/qrPay.html">
            
                    
                    微信扫码支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.6" data-path="../wxpay/appPay.html">
            
                <a href="../wxpay/appPay.html">
            
                    
                    微信APP支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.7" data-path="../wxpay/H5.html">
            
                <a href="../wxpay/H5.html">
            
                    
                    微信H5支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.8" data-path="../wxpay/wxapp.html">
            
                <a href="../wxpay/wxapp.html">
            
                    
                    微信小程序支付
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.9" data-path="../wxpay/redpack.html">
            
                <a href="../wxpay/redpack.html">
            
                    
                    微信现金红包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.10" data-path="../wxpay/transfers.html">
            
                <a href="../wxpay/transfers.html">
            
                    
                    微信企业付款
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.11" data-path="../wxpay/refund.html">
            
                <a href="../wxpay/refund.html">
            
                    
                    微信退款
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.12" data-path="../wxpay/wxpay-notify.html">
            
                <a href="../wxpay/wxpay-notify.html">
            
                    
                    服务端异步通知
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >IJPay 支付宝初始化</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="ijpay&#x652F;&#x4ED8;&#x5B9D;&#x521D;&#x59CB;&#x5316;">IJPay&#x652F;&#x4ED8;&#x5B9D;&#x521D;&#x59CB;&#x5316;</h1>
<p>&#x5728;&#x4ECB;&#x7ECD;IJPay&#x4E2D;&#x652F;&#x4ED8;&#x5B9D;&#x652F;&#x4ED8;&#x63A5;&#x53E3;&#x521D;&#x59CB;&#x5316;&#x4E4B;&#x524D;&#x5148;&#x4ECB;&#x7ECD;&#x4E00;&#x4E0B;&#x652F;&#x4ED8;&#x5B9D;&#x670D;&#x52A1;&#x7AEF;&#x7684;SDK&#x3002;&#x56E0;&#x4E3A;IJPay&#x652F;&#x4ED8;&#x5B9D;&#x652F;&#x4ED8;&#x63A5;&#x53E3;&#x662F;&#x57FA;&#x4E8E;&#x6B64;SDK&#x8FDB;&#x884C;&#x518D;&#x6B21;&#x5C01;&#x88C5;&#x7684;&#x3002;</p>
<h3 id="&#x652F;&#x4ED8;&#x5B9D;&#x670D;&#x52A1;&#x7AEF;sdk">&#x652F;&#x4ED8;&#x5B9D;&#x670D;&#x52A1;&#x7AEF;SDK</h3>
<p><a href="https://docs.open.alipay.com/54" target="_blank">&#x670D;&#x52A1;&#x5668;SDK&#x4ECB;&#x7ECD;&#x4EE5;&#x53CA;&#x4E0B;&#x8F7D;&#x5730;&#x5740;</a></p>
<p>&#x4F7F;&#x7528;SDK&#x5206;&#x4E3A;&#x4EE5;&#x4E0B;&#x51E0;&#x4E2A;&#x6B65;&#x9AA4;</p>
<ol>
<li>&#x5B9E;&#x4F8B;&#x5316;&#x5BA2;&#x6237;&#x7AEF;</li>
<li>&#x5B9E;&#x4F8B;&#x5316;&#x5177;&#x4F53;API&#x5BF9;&#x5E94;&#x7684;request&#x7C7B;</li>
<li>&#x8BBE;&#x7F6E;&#x8BF7;&#x6C42;&#x53C2;&#x6570;(SDK&#x5DF2;&#x7ECF;&#x5C01;&#x88C5;&#x6389;&#x4E86;&#x516C;&#x5171;&#x53C2;&#x6570;&#xFF0C;&#x8FD9;&#x91CC;&#x53EA;&#x9700;&#x8981;&#x4F20;&#x5165;&#x4E1A;&#x52A1;&#x53C2;&#x6570;)</li>
<li>&#x6267;&#x884C;API&#x8BF7;&#x6C42;</li>
<li>&#x5904;&#x7406;&#x4E1A;&#x52A1;&#x903B;&#x8F91;</li>
</ol>
<p>&#x4EE5;&#x4E0B;&#x662F;&#x652F;&#x4ED8;&#x5B9D;SDK&#x4E2D;WAP&#x652F;&#x4ED8;&#x793A;&#x4F8B;</p>
<pre><code>//&#x5B9E;&#x4F8B;&#x5316;&#x5BA2;&#x6237;&#x7AEF;
AlipayClient alipayClient = new DefaultAlipayClient(&quot;https://openapi.alipay.com/gateway.do&quot;, APP_ID, APP_PRIVATE_KEY, &quot;json&quot;, CHARSET, ALIPAY_PUBLIC_KEY, &quot;RSA2&quot;);
//&#x5B9E;&#x4F8B;&#x5316;&#x5177;&#x4F53;API&#x5BF9;&#x5E94;&#x7684;request&#x7C7B;,&#x7C7B;&#x540D;&#x79F0;&#x548C;&#x63A5;&#x53E3;&#x540D;&#x79F0;&#x5BF9;&#x5E94;,&#x5F53;&#x524D;&#x8C03;&#x7528;&#x63A5;&#x53E3;&#x540D;&#x79F0;&#xFF1A;alipay.open.public.template.message.industry.modify 
AlipayOpenPublicTemplateMessageIndustryModifyRequest request = new AlipayOpenPublicTemplateMessageIndustryModifyRequest();
//SDK&#x5DF2;&#x7ECF;&#x5C01;&#x88C5;&#x6389;&#x4E86;&#x516C;&#x5171;&#x53C2;&#x6570;&#xFF0C;&#x8FD9;&#x91CC;&#x53EA;&#x9700;&#x8981;&#x4F20;&#x5165;&#x4E1A;&#x52A1;&#x53C2;&#x6570;
//&#x6B64;&#x6B21;&#x53EA;&#x662F;&#x53C2;&#x6570;&#x5C55;&#x793A;&#xFF0C;&#x672A;&#x8FDB;&#x884C;&#x5B57;&#x7B26;&#x4E32;&#x8F6C;&#x4E49;&#xFF0C;&#x5B9E;&#x9645;&#x60C5;&#x51B5;&#x4E0B;&#x8BF7;&#x8F6C;&#x4E49;
request.setBizContent(&quot;  {&quot; +
&quot;    \&quot;primary_industry_name\&quot;:\&quot;IT&#x79D1;&#x6280;/IT&#x8F6F;&#x4EF6;&#x4E0E;&#x670D;&#x52A1;\&quot;,&quot; +
&quot;    \&quot;primary_industry_code\&quot;:\&quot;10001/20102\&quot;,&quot; +
&quot;    \&quot;secondary_industry_code\&quot;:\&quot;10001/20102\&quot;,&quot; +
&quot;    \&quot;secondary_industry_name\&quot;:\&quot;IT&#x79D1;&#x6280;/IT&#x8F6F;&#x4EF6;&#x4E0E;&#x670D;&#x52A1;\&quot;&quot; +
&quot; }&quot;);
AlipayOpenPublicTemplateMessageIndustryModifyResponse response = alipayClient.execute(request); 
//&#x8C03;&#x7528;&#x6210;&#x529F;&#xFF0C;&#x5219;&#x5904;&#x7406;&#x4E1A;&#x52A1;&#x903B;&#x8F91;
if(response.isSuccess()){
    //.....
}
</code></pre><blockquote>
<p>&#x53EF;&#x4EE5;&#x4ECE;<a href="https://docs.open.alipay.com/54" target="_blank">JavaSDK&#x96C6;&#x6210;&#x793A;&#x4F8B;</a>&#x4E2D;&#x770B;&#x5230;&#x6BCF;&#x6B21;&#x90FD;&#x8981;&#x521D;&#x59CB;&#x5316;&#x5BA2;&#x6237;&#x7AEF;&#xFF0C;&#x9700;&#x8981;&#x67E5;&#x8BE2;&#x5BF9;&#x5E94;&#x7684;API&#x4EE5;&#x53CA;&#x590D;&#x6742;&#x53C2;&#x6570;&#xFF0C;&#x63A5;&#x5165;&#x6B65;&#x9AA4;&#x6BD4;&#x8F83;&#x590D;&#x6742;&#x3002;IJPay&#x5C31;&#x662F;&#x4E3A;&#x4E86;&#x89E3;&#x51B3;&#x4EE5;&#x4E0A;&#x95EE;&#x9898;&#x800C;&#x8BDE;&#x751F;&#x7684;&#x3002;&#x5177;&#x4F53;&#x63A5;&#x5165;&#x6B65;&#x9AA4;&#x540E;&#x9762;&#x4F1A;&#x8BE6;&#x7EC6;&#x4ECB;&#x7ECD;&#xFF0C;&#x6211;&#x4EEC;&#x5148;&#x6765;&#x770B;&#x770B;IJPay&#x4E2D;&#x652F;&#x4ED8;&#x5B9D;&#x63A5;&#x53E3;&#x7684;&#x521D;&#x59CB;&#x5316;&#x3002;</p>
</blockquote>
<h3 id="ijpay-&#x652F;&#x4ED8;&#x5B9D;&#x521D;&#x59CB;&#x5316;">IJPay &#x652F;&#x4ED8;&#x5B9D;&#x521D;&#x59CB;&#x5316;</h3>
<p><strong>IJPay&#x4E2D;&#x7684;&#x652F;&#x4ED8;&#x5B9D;&#x652F;&#x4ED8;&#x652F;&#x6301;&#x591A;&#x5E94;&#x7528;&#x63A5;&#x5165;</strong>&#x521D;&#x59CB;&#x5316;&#x5BA2;&#x6237;&#x7AEF;&#x4EE3;&#x7801;&#x5982;&#x4E0B;</p>
<pre><code>AliPayApiConfig aliPayApiConfig = AliPayApiConfig.New()
        .setAppId(app_id)
        .setAlipayPublicKey(alipay_public_key)
        .setCharset(charset)
        .setPrivateKey(private_key)
        .setServiceUrl(service_url)
        .setSignType(sign_type)
        .build();
AliPayApiConfigKit.setThreadLocalAliPayApiConfig(aliPayApiConfig);
</code></pre><p>&#x5F53;&#x7136;&#x652F;&#x4ED8;&#x63A5;&#x53E3;&#x4E2D;&#x4E5F;&#x4E0D;&#x7528;&#x6BCF;&#x6B21;&#x90FD;&#x8BBE;&#x7F6E;<code>AliPayApiConfig</code>&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>AliPayApiConfigKit.getApiConfig(String appId)</code>&#x83B7;&#x53D6;<code>AliPayApiConfig</code></p>
<pre><code>//&#x901A;&#x8FC7;appId&#x83B7;&#x53D6;&#x914D;&#x7F6E;
AliPayApiConfig aliPayApiConfig =AliPayApiConfigKit.getApiConfig(appId);
</code></pre><h3 id="&#x4EE3;&#x7801;&#x793A;&#x4F8B;">&#x4EE3;&#x7801;&#x793A;&#x4F8B;</h3>
<p><a href="https://gitee.com/javen205/IJPay-Demo" target="_blank">https://gitee.com/javen205/IJPay-Demo</a></p>
<p>Demo&#x4E2D;&#x53C2;&#x6570;&#x662F;&#x914D;&#x7F6E;&#x5728;<code>.properties</code>&#x6587;&#x4EF6;&#x5F53;&#x4E2D;&#x5F53;&#x7136;&#x4F60;&#x4E5F;&#x53EF;&#x4EE5;&#x914D;&#x7F6E;&#x5230;&#x6570;&#x636E;&#x5E93;&#x3002; &#x9879;&#x76EE;&#x9ED8;&#x8BA4;&#x4F7F;&#x7528;dev&#x73AF;&#x5883;&#x4E0B;&#x7684;&#x914D;&#x7F6E;&#x3002; &#x5982;&#x679C;<code>src/main/resources</code>&#x6CA1;&#x6709;<code>dev</code>&#x6587;&#x4EF6;&#x5939;&#x53EF;&#x4EE5;&#x590D;&#x5236;<code>production</code>&#x4E00;&#x4EFD;&#x5E76;&#x4FEE;&#x6539;&#x4E3A;<code>dev</code>&#xFF0C;&#x518D;&#x4FEE;&#x6539;<code>dev</code>&#x4E2D;&#x76F8;&#x5173;&#x7684;&#x914D;&#x7F6E;&#x53C2;&#x6570;</p>
<p><strong>&#x591A;&#x5E94;&#x7528;&#x652F;&#x6301;&#xFF0C;JFinal&#x5B8C;&#x6574;&#x7248;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#x5982;&#x4E0B;&#xFF1A;</strong></p>
<pre><code>/**
 * @Email javen205@126.com
 * @author Javen
 */
public class AliPayApiInterceptor implements Interceptor {
    AlipayService alipayService = new AlipayService();
    AppService appService = new AppService();
    AjaxResult ajax = new AjaxResult();

    @Override
    public void intercept(Invocation inv) {
        Controller controller = inv.getController();
        String appId = controller.getPara(&quot;appId&quot;);
        if (StrKit.isBlank(appId)) {
            controller.renderJson(ajax.addError(&quot;&#x5E94;&#x7528;&#x7684;&#x7F16;&#x53F7;&#x4E0D;&#x80FD;&#x4E3A;&#x7A7A;&quot;));
            return;
        }
        //&#x5224;&#x65AD;&#x5E94;&#x7528;&#x662F;&#x5426;&#x5B58;&#x5728;
        App app = appService.getAppByAppId(appId, 1);
        AliPayApiConfig aliPayApiConfig = null;
        if (app !=null) {
            // &#x901A;&#x8FC7;&#x5E94;&#x7528;&#x7684;appId&#x67E5;&#x8BE2;&#x652F;&#x4ED8;&#x5B9D;&#x7684;&#x914D;&#x7F6E;
            Alipay alipay = alipayService.getAlipayByAppId(appId);
            if (alipay != null) {
                try {
                    aliPayApiConfig = AliPayApiConfigKit.getApiConfig(alipay.getAppId());
                } catch (Exception e) {
                    LogKit.error(&quot;&#x5B9E;&#x4F8B;&#x5316;AliPayApiConfig...&quot;);
                    // &#x5982;&#x679C;Map&#x4E2D;&#x6CA1;&#x6709;&#x5F53;&#x524D;&#x652F;&#x4ED8;&#x5B9D;&#x7684;&#x5B9E;&#x4F8B;&#x5C31;&#x521D;&#x59CB;&#x5316;&#x5E76;&#x6DFB;&#x52A0;&#x5230;Map&#x4E2D;
                    aliPayApiConfig = AliPayApiConfig.New()
                            .setAppId(alipay.getAppId())
                            .setAlipayPublicKey(alipay.getPublicKey())
                            .setCharset(IJPayConsts.CHARSET)
                            .setPrivateKey(alipay.getPrivateKey())
                            .setServiceUrl(alipay.getServerUrl())
                            .setSignType(IJPayConsts.SIGN_TYPE)
                            .build();
                }
            }
        }
        if (aliPayApiConfig != null) {
            AliPayApiConfigKit.setThreadLocalAliPayApiConfig(aliPayApiConfig);
            controller.setAttr(&quot;app&quot;, app);
            inv.invoke();
        } else {
            LogKit.error(&quot;aliPayApiConfig is null&quot;);
            controller.renderJson(ajax.addError(&quot;&#x6B64;&#x5E94;&#x7528;&#x6682;&#x672A;&#x914D;&#x7F6E;&#x652F;&#x4ED8;&#x5B9D;&#x652F;&#x4ED8;&#x7684;&#x53C2;&#x6570;&quot;));
        }
    }
}
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="alipay-config.html" class="navigation navigation-prev " aria-label="Previous page: 配置应用环境">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="alipay-wap.html" class="navigation navigation-next " aria-label="Next page: 支付宝手机网站支付">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"IJPay 支付宝初始化","level":"1.7.2.2","depth":3,"next":{"title":"支付宝手机网站支付","level":"1.7.2.3","depth":3,"path":"doc/ijpay/alipay/alipay-wap.md","ref":"doc/ijpay/alipay/alipay-wap.md","articles":[]},"previous":{"title":"配置应用环境","level":"1.7.2.1","depth":3,"path":"doc/ijpay/alipay/alipay-config.md","ref":"doc/ijpay/alipay/alipay-config.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"doc/ijpay/alipay/alipay-init.md","mtime":"2018-09-27T15:07:51.335Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-09-28T14:55:50.579Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

